364 research outputs found

    Top-Down Skiplists

    Full text link
    We describe todolists (top-down skiplists), a variant of skiplists (Pugh 1990) that can execute searches using at most log2εn+O(1)\log_{2-\varepsilon} n + O(1) binary comparisons per search and that have amortized update time O(ε1logn)O(\varepsilon^{-1}\log n). A variant of todolists, called working-todolists, can execute a search for any element xx using log2εw(x)+o(logw(x))\log_{2-\varepsilon} w(x) + o(\log w(x)) binary comparisons and have amortized search time O(ε1logw(w))O(\varepsilon^{-1}\log w(w)). Here, w(x)w(x) is the "working-set number" of xx. No previous data structure is known to achieve a bound better than 4log2w(x)4\log_2 w(x) comparisons. We show through experiments that, if implemented carefully, todolists are comparable to other common dictionary implementations in terms of insertion times and outperform them in terms of search times.Comment: 18 pages, 5 figure

    Planar Visibility: Testing and Counting

    Full text link
    In this paper we consider query versions of visibility testing and visibility counting. Let SS be a set of nn disjoint line segments in R2\R^2 and let ss be an element of SS. Visibility testing is to preprocess SS so that we can quickly determine if ss is visible from a query point qq. Visibility counting involves preprocessing SS so that one can quickly estimate the number of segments in SS visible from a query point qq. We present several data structures for the two query problems. The structures build upon a result by O'Rourke and Suri (1984) who showed that the subset, VS(s)V_S(s), of R2\R^2 that is weakly visible from a segment ss can be represented as the union of a set, CS(s)C_S(s), of O(n2)O(n^2) triangles, even though the complexity of VS(s)V_S(s) can be Ω(n4)\Omega(n^4). We define a variant of their covering, give efficient output-sensitive algorithms for computing it, and prove additional properties needed to obtain approximation bounds. Some of our bounds rely on a new combinatorial result that relates the number of segments of SS visible from a point pp to the number of triangles in sSCS(s)\bigcup_{s\in S} C_S(s) that contain pp.Comment: 22 page

    The Fresh-Finger Property

    Full text link
    The unified property roughly states that searching for an element is fast when the current access is close to a recent access. Here, "close" refers to rank distance measured among all elements stored by the dictionary. We show that distance need not be measured this way: in fact, it is only necessary to consider a small working-set of elements to measure this rank distance. This results in a data structure with access time that is an improvement upon those offered by the unified property for many query sequences
    corecore